<?php 
/**
 *
 * @category    API
 * @package     Api_Company
 * @subpackage  Model
 * @author      trungpm
 */
class Api_Model_SecurityGroups {
    /* get all security roles
     * author: trungpm
     */
    function GetTokensBySecroleId($SecroleId, $user, $password) {
        $Errors = array();
        $db = db($user, $password);
        if (gettype($db) == 'integer') {
            $Errors[0] = NoAuthorisation;
            return $Errors;
        }
        $sql = "SELECT tokenid FROM securitygroups WHERE secroleid = $SecroleId";
        $result = DB_query($sql, $db);
        return $result;
    }
    
}
?>
